<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ include file="/app/util/jsp/tag.jsp"%>
<script type="text/javascript">
	function clear(){
		$("#pid").combotree('setValue','');
	}
	$(function() {
		$("input[name='iconCls']").combobox({
			valueField:'value',
			textField:'text',
			data:$.iconData,
			multiple:false,
			editable:false,
			width:182,
			formatter : function(v) {
				return $.formatString('<span class="{0}" style="display:inline-block;vertical-align:middle;width:16px;height:16px;"></span>{1}', v.value, v.text);
			}
		});
	});
</script>
<div class="easyui-layout" data-options="fit:true,border:false">
	<div data-options="region:'center',border:false">
		<form  id="reseditForm" action="${ctx }/menuctrl/edit.do" method="post">
			<input type="hidden" name="id"/>
			<input type="hidden" name="oper"/>
			<table class="tb_n">
				<tr>
					<td class="td_l">资源名称：</td>
					<td class="td_r"><input type="text" name="text" class="easyui-validatebox" data-options="required:true,validType:['length[1,100]']"/></td>
					<td class="td_l">资源类型：</td>
					<td class="td_r"><input name="type" class="easyui-combobox" data-options="required:true,editable:false,valueField: 'label',textField: 'value',data: [{label: 'menu',value: '菜单'},{label: 'list',value: '列表'},{label: 'button',value: '操作'},{label: 'link',value: '链接'},{label: 'other',value: '其它'}],width:182"/></td>
				</tr>
				<tr>
					<td class="td_l">资源链接：</td>
					<td class="td_r"><input type="text" name="url" class="easyui-validatebox" data-options="validType:['length[1,200]']"/></td>
					<td class="td_l">资源方法：</td>
					<td class="td_r"><input type="text" name="method" class="easyui-validatebox" data-options="validType:['length[1,50]']"/></td>
				</tr>
				<tr>
					<td class="td_l">资源图标：</td>
					<td class="td_r"><input name="iconCls"/></td>
					<td colspan="2">&nbsp;</td>
				</tr>
				<tr>
					<td class="td_l">上级资源：</td>
					<td colspan="3">
						<input type="text" id="pid" name="pid" class="easyui-combotree" data-options="url:'${ctx }/menuctrl/listTree.do',editable:false,multiple:false,cascadeCheck:false,width:440"/>
						<a href="javascript:clear();" class="easyui-linkbutton" data-options="iconCls:'icon-cut',plain:true" title="清空上级资源"></a>
					</td>
				</tr>
				<tr>
					<td class="td_l" style="vertical-align: top;">备注：</td>
					<td colspan="3" class="td_r_l"><textarea name="remark" style="overflow-y: auto;" data-options="required:true"></textarea></td>
				</tr>
			</table>
		</form>
	</div>
</div>
